package com.lanyam.travel.base.utils;

import java.util.HashMap;
import java.util.Map;

public class StateUtils {

    public static final int ERRCODE_OK = 0;
    public static final int ERRCODE_CASH_ERROR = 9999;
    public static final int ERRCODE_SYS_ERROR = 10000;
    public static final int ERRCODE_UNLOGIN = 10001;
    public static final int ERRCODE_EXISTING_PHONE = 10002;
    public static final int ERRCODE_VERIFYCODE_TOO_OFEN = 10003;
    public static final int ERRCODE_VERIFYCODE_FAILED = 10004;
    public static final int ERRCODE_VERIFYCODE_TOO_MANY_TIMES = 10005;
    public static final int ERRCODE_UNEXISTING_PHONE = 10006;
    public static final int ERRCODE_PASSWORD_ERROR = 10007;
    public static final int ERRCODE_PERMISSION_DENIED = 10008;
    public static final int ERRCODE_LOSS_PARAMETERS = 10009;
    public static final int ERRCODE_UPLOAD_PIC_FAILED = 10010;
    public static final int ERRCODE_ISNOT_YOUR_SYSMSG = 10011;
    public static final int ERRCODE_PARAMETERS_ERROR = 10012;
    public static final int ERRCODE_OTHER_ERROR = 10013;
    public static final int ERRCODE_ILLEGAL_PHONE = 10014;
    public static final int ERRCODE_UNEXISTING_ARTICLE = 10015;
    public static final int ERRCODE_COLLECTED_ARTICLE = 10016;
    public static final int ERRCODE_UNCONFIRM_PASSWORD = 10017;
    public static final int ERRCODE_UNEXISTING_USER = 10018;
    public static final int ERRCODE_SMS_SEND_LIMIT = 10019;           //1小时内同一手机号发送次数不能超过3次
    public static final int ERRCODE_QRCODE_NOT_OPEN = 10020;
    public static final int ERRCODE_PATIENT_REPEATBIND = 10021;
    public static final int ERRCODE_USER_HAS_EXIST = 10027;
    public static final int ERRCODE_TOKEN_EXPIRE = 10028;           //TOKEN过期
    public static final int ERRCODE_TOKEN_ERROR = 10029;            //TOKEN错误
    public static final int ERRCODE_OTHER_USER_BIND = 10030;        //已被其他用户绑定
    public static final int ERRCODE_USER_NOT_UNBIND = 10031;       //用户没有解绑
    public static final int ERRCODE_OTHER_REGION_BIND = 10032;       //已被其他REGION绑定
    public static final int ERRCODE_REPEAT_SUBMIT = 10033;
    public static final int ERRCODE_SERVER_MAINTENANCE = 10034;
    public static final int ERRCODE_RECORD_IS_REFERENCED = 10036;    //数据记录被引用
    public static final int ERRCODE_DEVICE_BIND_TOKEN = 10037;
    public static final int ERRCODE_ACCOUNT_LOG_OFF = 10038;       //账号已注销
    public static final int ERRCODE_UNEXISTING_HEALTH_RECORD = 20000;
    public static final int ERRCODE_IS_FRIEND = 20001;
    public static final int ERRCODE_ADD_NONFRIEND_USER_TO_GROUP = 20002;
    public static final int ERRCODE_HAS_BEEN_IN_GROUP = 20003;
    public static final int ERRCODE_GROUP_HAS_BEEN_DELETED = 20004;
    public static final int ERRCODE_EXISTING_HEALTH_RECORD = 20005;
    public static final int ERRCODE_NOT_YOUR_HEALTH_RECORD = 20006;
    public static final int ERRCODE_NOT_YOUR_REMIND = 20007;
    public static final int ERRCODE_PATIENT_EXIST = 20013;
    public static final int ERRCODE_IDCARD_HAS_EXIST = 20014;        //身份证号
    public static final int ERRCODE_UNVERIFIED = 30000;
    public static final int ERRCODE_EXISTING_NUMBER = 30001;


    private static Map<Integer, String> ERRCODE_MAP = new HashMap<>();

    public static Map<Integer, String> getStateMap() {
        return ERRCODE_MAP;
    }

    static {
        ERRCODE_MAP.put(0, "ERRCODE_OK");
        ERRCODE_MAP.put(9999, "ERRCODE_CASH_ERROR");
        ERRCODE_MAP.put(10000, "ERRCODE_SYS_ERROR");
        ERRCODE_MAP.put(10001, "ERRCODE_UNLOGIN");
        ERRCODE_MAP.put(10002, "ERRCODE_EXISTING_PHONE");
        ERRCODE_MAP.put(10003, "ERRCODE_VERIFYCODE_TOO_OFEN");
        ERRCODE_MAP.put(10004, "ERRCODE_VERIFYCODE_FAILED");
        ERRCODE_MAP.put(10005, "ERRCODE_VERIFYCODE_TOOOFEN_TODY");
        ERRCODE_MAP.put(10006, "ERRCODE_UNEXISTING_PHONE");
        ERRCODE_MAP.put(10007, "ERRCODE_PASSWORD_ERROR");
        ERRCODE_MAP.put(10008, "ERRCODE_PERMISSION_DENIED");
        ERRCODE_MAP.put(10009, "ERRCODE_LOSS_PARAMETERS");
        ERRCODE_MAP.put(10010, "ERRCODE_UPLOAD_PIC_FAILED");
        ERRCODE_MAP.put(10011, "ERRCODE_ISNOT_YOUR_SYSMSG");
        ERRCODE_MAP.put(10012, "ERRCODE_PARAMETERS_ERROR");
        ERRCODE_MAP.put(10013, "ERRCODE_OTHER_ERROR");
        ERRCODE_MAP.put(10014, "ERRCODE_ILLEGAL_PHONE");
        ERRCODE_MAP.put(10015, "ERRCODE_UNEXISTING_ARTICLE");
        ERRCODE_MAP.put(10016, "ERRCODE_COLLECTED_ARTICLE");
        ERRCODE_MAP.put(10017, "ERRCODE_UNCONFIRM_PASSWORD");
        ERRCODE_MAP.put(10018, "ERRCODE_UNEXISTING_USER");
        ERRCODE_MAP.put(10020, "ERRCODE_QRCODE_NOT_OPEN");
        ERRCODE_MAP.put(20000, "ERRCODE_UNEXISTING_HEALTH_RECORD");
        ERRCODE_MAP.put(20001, "ERRCODE_IS_FRIEND");
        ERRCODE_MAP.put(20002, "ERRCODE_ADD_NONFRIEND_USER_TO_GROUP");
        ERRCODE_MAP.put(20003, "ERRCODE_HAS_BEEN_IN_GROUP");
        ERRCODE_MAP.put(20004, "ERRCODE_GROUP_HAS_BEEN_DELETED");
        ERRCODE_MAP.put(20005, "ERRCODE_EXISTING_HEALTH_RECORD");
        ERRCODE_MAP.put(20006, "ERRCODE_NOT_YOUR_HEALTH_RECORD");
        ERRCODE_MAP.put(20007, "ERRCODE_NOT_YOUR_REMIND");
        ERRCODE_MAP.put(30000, "ERRCODE_UNVERIFIED");
    }
}
